package edu.dayu.mapper;

import edu.dayu.pojo.Blog;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface BlogMapper {
    List<Blog> listBlog(Blog blog);

    int countBlogType(Map<String,Object> map);

    List<Blog> listTypeBlog(Blog blog);

    int[] listTagBlog(int id);

    int getBlogTypeId(int id);

    Blog getBlog(Blog blog);

    Boolean saveBlog(Blog blog);

    Boolean updateBlog(Blog blog);

    void deleteBlog(int id);

    Boolean saveTypeBlogs(Blog blog);

    Boolean saveTagBlogs(Blog blog);

    int  getBlogsId(Blog blog);

    Boolean updateTypeBlogs(Blog blog);

    int [] listBlogPublished();

    int [] listTagBlogId(int id);

    void updateBlogViews(Blog blog);

    List<String> listYear();

    List<Blog> listBlogByYear(String year);
}
